package com.wangzhixuan.db.bean;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Dell on 2017/2/17.
 */
public class Comment {
    private long id;
    private long customerId;
    private long orderId;
    private long doctorId;
    private int doctorScore;
    private int serverScore;
    private String comment;
    private Date updated;
    private String date;
    private String doctorScoreStr;
    private String serverScoreStr;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(long customerId) {
        this.customerId = customerId;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(long doctorId) {
        this.doctorId = doctorId;
    }

    public int getDoctorScore() {
        return doctorScore;
    }

    public void setDoctorScore(int doctorScore) {
        this.doctorScore = doctorScore;
    }

    public int getServerScore() {
        return serverScore;
    }

    public void setServerScore(int serverScore) {
        this.serverScore = serverScore;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getDate() {
        DateFormat df=new SimpleDateFormat("yyyy-MM-dd");
        return df.format(this.updated);
    }

    public String getDoctorScoreStr() {
        String str="";
        if(this.getDoctorScore()==1){
            str="非常不满意";
        }
        if(this.getDoctorScore()==2){
            str="不满意";
        }
        if(this.getDoctorScore()==3){
            str="一般";
        }
        if(this.getDoctorScore()==4){
            str="满意";
        }
        if(this.getDoctorScore()==5){
            str="非常满意";
        }
        return str;
    }


    public String getServerScoreStr() {
        String str="";
        if(this.getServerScore()==1){
            str="非常不满意";
        }
        if(this.getServerScore()==2){
            str="不满意";
        }
        if(this.getServerScore()==3){
            str="一般";
        }
        if(this.getServerScore()==4){
            str="满意";
        }
        if(this.getServerScore()==5){
            str="非常满意";
        }
        return str;
    }

}
